from urllib.request import urlretrieve

import requests

url = 'http://www.yishuzi.com/b/re13.php'
d = requests.post(url, data={'id': '测试签名', 'zhenbi': '20191123',
                             'id1': '904', 'id2': '#FFFFFF', 
                             'id4': '#000000', 'id6': '#000000'})
d.content.decode("utf-8")

def create_sign(word):
    url = 'http://www.yishuzi.com/b/re13.php'
    d = requests.post(url, data={'id': word, 'zhenbi': '20191123',
                                 'id1': '904', 'id2': '#FFFFFF', 'id4': '#000000', 'id6': '#000000'})
    myurl = d.content.decode("utf-8").split('"')[1]
    urlretrieve(myurl, word + '.png')

root = Tk()
root.title("签名设计 by：快学Python")
root.geometry("600x400")
bg_image = PhotoImage(file = 'background.png')
bg_label = Label(root, image = bg_image)
bg_label.place(relwidth = 1, relheight = 1)
frame = Frame(root, bg = '#edcc79', bd = 5)
frame.place(relx = 0.5, rely = 0.1, relwidth = 0.75, relheight = 0.1,anchor = 'n')
font_label = Label(frame, text = '输入签名:', font = ('微软雅黑', 16), fg ='black')
font_label.place(relwidth = 0.25, relheight = 1)
name_entry = entry(frame, font = ('微软雅黑', 16))
